package com.docker.chy.service.impl;

import java.util.List;
import com.docker.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.docker.chy.mapper.OrderTJiMapper;
import com.docker.chy.domain.OrderTJi;
import com.docker.chy.service.IOrderTJiService;

/**
 * 订单收费统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
@Service
public class OrderTJiServiceImpl implements IOrderTJiService 
{
    @Autowired
    private OrderTJiMapper orderTJiMapper;

    /**
     * 查询订单收费统计
     * 
     * @param id 订单收费统计主键
     * @return 订单收费统计
     */
    @Override
    public OrderTJi selectOrderTJiById(Long id)
    {
        return orderTJiMapper.selectOrderTJiById(id);
    }

    /**
     * 查询订单收费统计列表
     * 
     * @param orderTJi 订单收费统计
     * @return 订单收费统计
     */
    @Override
    public List<OrderTJi> selectOrderTJiList(OrderTJi orderTJi)
    {
        return orderTJiMapper.selectOrderTJiList(orderTJi);
    }

    /**
     * 新增订单收费统计
     * 
     * @param orderTJi 订单收费统计
     * @return 结果
     */
    @Override
    public int insertOrderTJi(OrderTJi orderTJi)
    {
        orderTJi.setCreateTime(DateUtils.getNowDate());
        return orderTJiMapper.insertOrderTJi(orderTJi);
    }

    /**
     * 修改订单收费统计
     * 
     * @param orderTJi 订单收费统计
     * @return 结果
     */
    @Override
    public int updateOrderTJi(OrderTJi orderTJi)
    {
        return orderTJiMapper.updateOrderTJi(orderTJi);
    }

    /**
     * 批量删除订单收费统计
     * 
     * @param ids 需要删除的订单收费统计主键
     * @return 结果
     */
    @Override
    public int deleteOrderTJiByIds(Long[] ids)
    {
        return orderTJiMapper.deleteOrderTJiByIds(ids);
    }

    /**
     * 删除订单收费统计信息
     * 
     * @param id 订单收费统计主键
     * @return 结果
     */
    @Override
    public int deleteOrderTJiById(Long id)
    {
        return orderTJiMapper.deleteOrderTJiById(id);
    }

    @Override
    public Double selectTotalAmount() {
        return orderTJiMapper.selectOrderTJiTotalAmount();
    }
}
